<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

class Course extends Model
{
    protected $table = 'course';
    protected $primaryKey = 'course_id';
    protected $fillable = ['pro_id','course_name','course_price','course_desc','cover_img'];

    public function profession(){
        return $this->belongsTo('App\Http\Models\profession','pro_id','pro_id');
    }

    public function lesson(){
        return $this->hasMany('App\Http\Models\lesson','course_id','course_id');
    }
}
